<template>
  <div>
    <a-button type="primary" @click="showModal">
      新建
    </a-button>
    <a-modal :visible="visible" title="Basic Modal" @ok="handleOk" @cancel="handleOk" >
      <p v-for="(v,k) in data" :key='k'>{{k}}:<a-input  :placeholder="'请输入'+k" :v-model='v' /></p>
      <!-- <p>密  码：<a-input  placeholder="请输入密码" :v-model='password' /></p> -->
      <div>角色：<childbox1  :plainOptions="list1"  @all_info="get_all" /></div>
    </a-modal>
  </div>
</template>
<script>
import childbox1 from "./childbox";
export default {
  props:['data'],
  data() {
    return {
      visible: false,
      username:'',
      password:'',
      list1:['uzi',"ming","weixiao","clear_love"],
      defaultlist:["uzi"]
    };
  },
  components:{
      childbox1
  },
  methods: {
    showModal() {
      this.visible = true;
    },
    handleOk(e) {
      console.log(e);
      this.visible = false;
    },
    get_all(val){
      console.log(val)
    }
  },
};
</script>
